﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Interactivity;

namespace for7raid.Control
{
    class SliderMouseBehavior : Behavior<Slider>
    {
        protected override void OnAttached()
        {
            base.OnAttached();
            AssociatedObject.MouseWheel +=new System.Windows.Input.MouseWheelEventHandler(AssociatedObject_MouseWheel);
        }

        void AssociatedObject_MouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
        {
            if (e.Delta > 0)
            {
                //AssociatedObject.
                Slider.IncreaseLarge.Execute(null, AssociatedObject);
               
            }
            else
            {
                Slider.DecreaseLarge.Execute(null, AssociatedObject);
            }
        }
    }
}
